#ifndef USER_H
#define USER_H

#include <QColor>

class User
{
public:
        User();
        User(const User& old);	//copy constructor
        User(QString newName, QColor newColour);                                                          //constructs a new LOCAL user
        User(int newId, QString newName, QColor newColour);                                               //Constructor for loading a user
	User(int newId, QString newName, QColor newColour, QString newIp, int newPort, bool newOnline);   //used to add a new EXTERNAL user

	int getId() const {return id;}
	QString getName() const {return name;}
	QColor getColour() const {return colour;}
	QString getIp() const {return ip;}
	int getPort() const {return port;}
	bool getOnlineStatus() const {return online;}
        QString getAll();               //Return a string of all user information

        void setId(int newId) {id = newId;}
        void setName(QString newName) {name = newName;}
        void setColour(QColor newColour) {colour = newColour;}
        void setIp(QString newIp) {ip = newIp;}
        void setPort(int newPort) {port = newPort;}
	void setOnlineStatus(bool newOnline) {online = newOnline;}

private:
    int id;
    QString name;
    QColor colour;
    QString ip;
    int port;
    bool online;	//whether the user is connected to the session or not
};

#endif // USER_H
